Here are a couple hints from stuff I've learned. It doesn't look as if you can make a mybuild.properties file with Nant that you can with Ant. Instead you can go to the Nant/bin/ folder and look at the nant.exe.config file. There you will find a <properties> </properties> section. In there you can define global properties, such as VSS.Username in the format of
<properties>
<property name="VSS.Username" value="myusername">
<property name="VSS.PWD" value="mypassword">
</properties>
That way in any of your build scripts you can reference the ${VSS.Username} and you don't have to have that info repeated in your script at all, you define it once and that's it.
In my cruise.build (nant file) I have the property nant.onfailure defined so that it emails me but cruisecontrol.net also does that, so you don't have to define it in your nant file. If you want it in your nant file it can look like this:
<property name="nant.onfailure" value="buildFailed">
<target name="buildFailed" depends="">
<echo message="EMAILING NOW...">
<mail from="someEmail" tolist="myemailaddress" mailhost="smtpemail"
subject="Build Failed" message="The autobuild failed!" >
</mail>
</target>
You can define it within the ccnet.config as:
<publishers>
<xmllogger>
<email from="<a href=" from="myemail@mycompany.com">myemail@mycompany.com</a>" mailhost="smtpmail" includeDetails="true">
<users>
<user name="me" group="admin" address="<a href=">myemail@company.com</a>" />
</users>
<groups>
<group name="admin" notification="change">
</groups>
</email>
</publishers>
No comments:
Post a Comment